//
//  BHCircleColumnModel.swift
//  BigHealth
//
//  Created by 蔺百好 on 2021/7/8.
//

import UIKit

class BHCircleColumnModel: NSObject {
    var name: String = ""
    var columnId: String = ""
    var fixedFlag: Int = 0 // 是否为固定栏目  0:否 1:是
    var userColumnFlag: Int = 0 // 非固定栏目 用户是否关联  0:否  1:是
    
    
    func parseDic(_ dic: [String:Any])  {
        self.name = BHJsonTool.decodeStringFromDic(dic: dic, key: "name")
        self.columnId = BHJsonTool.decodeStringFromDic(dic: dic, key: "id")
        self.fixedFlag = BHJsonTool.decodeIntFromDic(dic: dic, key: "fixedFlag")
        self.userColumnFlag = BHJsonTool.decodeIntFromDic(dic: dic, key: "userColumnFlag")
    }
    
    var transModel: CZTopSegMentItemModel! {
        get {
            let model: CZTopSegMentItemModel = CZTopSegMentItemModel.init()
            model.itemName = name
            model.itemId = columnId
            model.textFont = .systemFont(ofSize: 14, weight: .medium)
            return model
        }
    }
    
}

